Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing types and parameters to Notifications API #332

Merged
merged 13 commits into from
Nov 14, 2023

Conversation

PattaFeuFeu
Copy link
Collaborator

@PattaFeuFeu PattaFeuFeu commented Nov 3, 2023

Description

This PR adds missing parameters types and account_id to the API to get all notifications.

It also adds missing NotificationTypes.

To better handle future updates of the Mastodon API where we aren’t fast enough to release a new version, I have changed the fallback value to null instead of MENTION.

I have changed the Parameters class a bit to improve testability. All unit tests still pass and outcome is as expected.

For review, it could make sense to go commit by commit.

Closes #313

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Breaking change
    • type is now nullable
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Mandatory Checklist

  • My change follows the projects coding style
  • I ran gradle check and there were no errors reported
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • KDoc added to all public methods

@PattaFeuFeu PattaFeuFeu added enhancement New feature or request code quality Everything related to code quality labels Nov 3, 2023
@PattaFeuFeu PattaFeuFeu self-assigned this Nov 3, 2023
Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Merging #332 (e1c6303) into master (2f3fcea) will decrease coverage by 0.74%.
The diff coverage is 91.66%.

❗ Current head e1c6303 differs from pull request most recent head 322c40d. Consider uploading reports for the commit 322c40d to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #332      +/-   ##
============================================
- Coverage     45.98%   45.25%   -0.74%     
+ Complexity      481      477       -4     
============================================
  Files           129      126       -3     
  Lines          3523     3434      -89     
  Branches        231      232       +1     
============================================
- Hits           1620     1554      -66     
+ Misses         1727     1707      -20     
+ Partials        176      173       -3     
Files Coverage Δ
...e/src/main/kotlin/social/bigbone/MastodonClient.kt 34.96% <100.00%> (-0.23%) ⬇️
...gbone/src/main/kotlin/social/bigbone/Parameters.kt 100.00% <100.00%> (ø)
...n/kotlin/social/bigbone/api/entity/Notification.kt 64.28% <100.00%> (+11.90%) ⬆️
...n/social/bigbone/api/method/NotificationMethods.kt 100.00% <100.00%> (+12.50%) ⬆️
.../kotlin/social/bigbone/rx/RxNotificationMethods.kt 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

@PattaFeuFeu PattaFeuFeu force-pushed the improvement/#313/add-missing-notification-types branch from b8213ca to 008f263 Compare November 3, 2023 19:41
@PattaFeuFeu
Copy link
Collaborator Author

Could we move forward with this one here? 😊 @andregasser @bocops

andregasser
andregasser previously approved these changes Nov 14, 2023
Copy link
Owner

@andregasser andregasser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good to me! 👍

@PattaFeuFeu
Copy link
Collaborator Author

Again please 🥺 @andregasser

@PattaFeuFeu PattaFeuFeu merged commit c89ec6d into master Nov 14, 2023
4 checks passed
@PattaFeuFeu PattaFeuFeu deleted the improvement/#313/add-missing-notification-types branch November 14, 2023 16:04
@andregasser andregasser added the breaking Incompatible with previous versions label Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Incompatible with previous versions code quality Everything related to code quality enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add missing types and parameters to Notifications API
3 participants